1. Field of The Invention
The present invention relates to an image compression device, and more particularly, to an image compression device that subjects image data to image compression.
The present invention also relates to an image compression method, and more particularly, to an image compression method that subjects image data to image compression.
The present invention also relates to an electronic camera, and more particularly, to an electronic camera in which an image compression device is mounted.
The present invention also relates to a computer-readable medium for image compression, and more particularly, to a computer-readable medium for image compression that may be used to cause a computer to function as an image compression device.
The present invention also relates to a computer system, and more particularly, to a computer system for compressing image data.
2. Discussion of The Related Art
Currently, a JPEG2000 compressed image file is produced by an encoding procedure, wherein an input image is subjected to color coordinate transformation and then the input image is divided into a plurality of rectangular areas (tile images) as necessary, and each of the tile images undergoes encoding processing. During the encoding process, the tile images undergo wavelet transformation, quantization, bit modeling, region of interest (ROI) encoding, and arithmetical encoding, thereby generating encoded data.
FIG. 9 is a diagram showing a decomposition of image data into sub-bands by repetitive wavelet transformation. During wavelet transformation, the tile images are subjected to a discrete wavelet transformation in vertical and horizontal directions, such that the tile images are decomposed by frequency into a plurality of sub-bands (1LL, 1LH 1HL, and 1HH). Among these sub-bands, 1LL, which contains a direct current component, is subjected to a further discrete wavelet transformation, and is decomposed by frequency into a plurality of further sub-bands (2LL, 2LH, 2HL, 2HH).
During quantization, the wavelet transformation coefficients are quantized to a quantization step width that is determined for each sub-band. Moreover, during a lossy/lossless unified processing, the quantization step is set as a “1.” During lossy compression, lower N bit planes are discarded during a subsequent discarding process. The discarding process is equivalent to a quantization step of “Nth power of 2.”
Following the quantization step, the wavelet transformation coefficients are divided into encoding blocks of a fixed size such as 64 ×64, for example, within each of the sub-bands. The transformation coefficients within each encoding block are divided into sign bits and absolute values; then the absolute values are distributed among a natural binary number of bit planes. The bit planes thus constructed are encoded via three types of encoding passes such as significance pass, refinement pass and cleanup pass, for example, in order from the upper bit planes. Furthermore, the sign bits are encoded immediately after the uppermost bits of the corresponding absolute values appear in the bit plane.
The ROI encoding is a function that increases the decoded image quality of selected regions on the tile images by preferentially assigning amounts of information to the selected regions. In other words, the quantized transformation coefficients positioned in selected regions are shifted upward by S bits. As a result, the selected regions are shifted to higher bit planes, and are preferentially encoded over any bits in the non-selected regions. Furthermore, in the case of a max shift method, the bit shift number S is set at a value that is greater than the number of places of the uppermost bits of the non-selected regions. As a result, the non-zero transformation coefficients of the selected regions are always values that are equal to or greater than “2 to the power of S.” Accordingly, at the time of decoding, the transformation coefficients of the selected regions can easily be restored by selectively shifting downward any quantized values that are equal to or greater than “2 to the power of S.”
During arithmetical encoding, the encoded data is further subjected to arithmetical encoding by an MQ coder.
After the encoding process is completed, a bit stream is formed by arranging the encoded data of respective tile images in a specified order, such as SNR progressive, for example.
In general, in the case of image data, the space frequency distribution and amount of noise vary sharply according to settings of an electronic camera during imaging and to differences in the imaging environment. However, in conventional image compression processing, the same image compression processing is performed for all data even in the case of image data obtained under different imaging conditions. As a result, in the case of image data that is acquired under imaging conditions that differ from ordinary conditions, it is difficult to distribute effective information among the transformation coefficients of the respective sub-bands in accordance with amounts of noise that differ from the ordinary amounts of noise, so that the image deterioration that accompanies image compression processing tends to increase. Furthermore, image data that is acquired under imaging conditions that differ from ordinary conditions tends to suffer from problems in terms of image quality such as noise, for example, that is inherently conspicuous.